package cn.com.zpon.shouyinyuandemo.activity;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

import cn.com.zpon.shouyinyuandemo.view.DialogFrag;
import cn.com.zpon.shouyinyuandemo.view.IDialog;


public class BaseActivity extends AppCompatActivity {

    protected IDialog mDialog;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        mDialog = new cn.com.zpon.shouyinyuandemo.view.FragmentDialog(this);
    }

    /**
     * 关闭dialog
     */
    public void dismissProgressDialog() {
        if (mDialog != null) {
            mDialog.dissmissDialog();
        }
    }
    /**
     * @param msg
     * @param callback
     */
    public void showProgressDialog(String msg, DialogFrag.DialogCallBackListerner callback) {
        if (mDialog != null) {
            mDialog.showProgressDialog(msg, callback);
        }
    }
}
